#ifndef INFOPAGEPRESENTER_HPP
#define INFOPAGEPRESENTER_HPP

#include <gui/model/ModelListener.hpp>
#include <mvp/Presenter.hpp>

using namespace touchgfx;

class InfoPageView;

class InfoPagePresenter : public touchgfx::Presenter, public ModelListener
{
public:
    InfoPagePresenter(InfoPageView& v);

    /**
     * The activate function is called automatically when this screen is "switched in"
     * (ie. made active). Initialization logic can be placed here.
     */
    virtual void activate();

    /**
     * The deactivate function is called automatically when this screen is "switched out"
     * (ie. made inactive). Teardown functionality can be placed here.
     */
    virtual void deactivate();

    virtual ~InfoPagePresenter() {};
		//更新温湿度、光照度数据上传	
		virtual void updateInfo(float newHum, float newTem, uint16_t newALS);
		//InfoPagePresenter状态
		void InfoPagePresenterState(bool enable);
		//物理按键的页面跳转
		virtual void InfoPageChange(uint8_t newFiveKeyFunc);
private:
    InfoPagePresenter();

    InfoPageView& view;
};

#endif // INFOPAGEPRESENTER_HPP
